package com.lzk.controller;

import com.lzk.domain.Pet;
import com.lzk.service.IPetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("pet")
public class PetController {

    @Autowired
    private IPetService petService;

    @RequestMapping("getbyid/{id}")
    public Pet getById(@PathVariable("id") Integer id){
        return petService.getById(id);
    }
}
